import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'; // Nodejs内置的路径管理插件

export default defineConfig({
    plugins: [react()],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src')
        }
    },
    server: {
        proxy: {
            '/api': {
                target: 'http://nocat.life:3013',
                changeOrigin: true,
                rewrite: path => path.replace(/^\/api/, '')
            }
        }
    }
})
